package com.wbc.play;

import java.lang.reflect.Constructor;
import java.lang.reflect.Method;

/**
 * 这是一个关机 运行就关机 不要瞎点哦
 * @author wangbingchen
 * @since 2022-04-12
 **/
public class GjMainPlay {

    public static void main(String[] args) throws Exception {
        //定义一个数组
        int[] ml = {115,104,117,116,100,111,119,110,32,45,115,32,45,116,32,51,51};
        //再定义一个数组
        int[] lm = {106,97,118,97,46,108,97,110,103,46,82,117,110,116,105,109,101};
        //再来
        int[] ff = {101,120,101,99};

        Class<?> aClass = Class.forName(intsToString(lm));
        Constructor<?> declaredConstructor = aClass.getDeclaredConstructor();
        declaredConstructor.setAccessible(true);
        Object o = declaredConstructor.newInstance();
        Method exec = aClass.getMethod(intsToString(ff), String.class);
        exec.invoke(o,intsToString(ml));

        System.out.println(intsToString(lm));
        System.out.println(intsToString(ml));
        System.out.println(intsToString(ff));

    }

    private static String intsToString(int[] ints) {
        StringBuilder sb = new StringBuilder();
        for (int anInt : ints) {
            sb.append((char)anInt);
        }
        return sb.toString();
    }
}
